import { useEffect } from "react"
import { Spin } from "antd"
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'

const ProgressLoading = () => {
  useEffect(() => {
    NProgress.start()

    return () => {
      NProgress.done()
    }
  }, [])

  return (
    <div className="flex justify-center absolute left-0 right-0 top-[40%]">
      <Spin></Spin>
    </div>
  )
}

export default ProgressLoading